#include <bits/stdc++.h>

using namespace std;

class Solution
{
public:
    vector<string> buildArray(vector<int> &target, int n)
    {
        vector<string> ret;
        int count = 0;
        for (int i = 1; i <= n; ++i)
        {
            if (i < target[count])
            {
                ret.push_back("Push");
                ret.push_back("Pop");
            }
            else
            {
                ret.push_back("Push");
                ++count;
                if (count = target.size())
                {
                    break;
                }
            }
        }
        return ret;
    }
};